package web.fabrimind.tas.domain;

import java.util.List;
import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import web.fabrimind.common.annotation.Excel;
import web.fabrimind.common.core.domain.BaseEntity;

/**
 * 物料出库申请对象 material_outbound_apply
 *
 * @author zhihui
 * @date 2025-04-04
 */
public class MaterialOutboundApply extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 申请ID */
    private Long applyId;

    /** 申请编号 */
    @Excel(name = "申请编号")
    private String applyCode;

    /** 申请类型（0:生产领料 1:销售出库 2:其他出库） */
    @Excel(name = "申请类型", readConverterExp = "0=:生产领料,1=:销售出库,2=:其他出库")
    private String applyType;

    /** 状态（0:待审核 1:已审核 2:已驳回 4:待提交） */
    @Excel(name = "状态", readConverterExp = "0=:待审核,1=:已审核,2=:已驳回,4=:待提交")
    private String status;

    /** 工单ID */
    @Excel(name = "工单ID")
    private Long orderId;

    /** 申请人ID */
    @Excel(name = "申请人ID")
    private Long applyUserId;

    /** 申请时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "申请时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date applyTime;

    /** 审核人ID */
    @Excel(name = "审核人ID")
    private Long auditUserId;

    /** 审核时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "审核时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date auditTime;

    /** 审核意见 */
    @Excel(name = "审核意见")
    private String auditOpinion;

    /** 物料出库申请明细信息 */
    private List<MaterialOutboundApplyDetail> materialOutboundApplyDetailList;

    /** 工单编号 */
    @Excel(name = "工单编号")
    private String orderCode;


    /** 申请人名称 */
    @Excel(name = "申请人名称")
    private String applyUserName;

    /** 审核人名称 */
    @Excel(name = "审核人名称")
    private String auditUserName;

    public String getApplyUserName() {
        return applyUserName;
    }

    public void setApplyUserName(String applyUserName) {
        this.applyUserName = applyUserName;
    }

    public String getAuditUserName() {
        return auditUserName;
    }

    public void setAuditUserName(String auditUserName) {
        this.auditUserName = auditUserName;
    }

    public String getOrderCode() {
        return orderCode;
    }

    public void setOrderCode(String orderCode) {
        this.orderCode = orderCode;
    }

    public void setApplyId(Long applyId)
    {
        this.applyId = applyId;
    }

    public Long getApplyId()
    {
        return applyId;
    }
    public void setApplyCode(String applyCode)
    {
        this.applyCode = applyCode;
    }

    public String getApplyCode()
    {
        return applyCode;
    }
    public void setApplyType(String applyType)
    {
        this.applyType = applyType;
    }

    public String getApplyType()
    {
        return applyType;
    }
    public void setStatus(String status)
    {
        this.status = status;
    }

    public String getStatus()
    {
        return status;
    }
    public void setOrderId(Long orderId)
    {
        this.orderId = orderId;
    }

    public Long getOrderId()
    {
        return orderId;
    }
    public void setApplyUserId(Long applyUserId)
    {
        this.applyUserId = applyUserId;
    }

    public Long getApplyUserId()
    {
        return applyUserId;
    }
    public void setApplyTime(Date applyTime)
    {
        this.applyTime = applyTime;
    }

    public Date getApplyTime()
    {
        return applyTime;
    }
    public void setAuditUserId(Long auditUserId)
    {
        this.auditUserId = auditUserId;
    }

    public Long getAuditUserId()
    {
        return auditUserId;
    }
    public void setAuditTime(Date auditTime)
    {
        this.auditTime = auditTime;
    }

    public Date getAuditTime()
    {
        return auditTime;
    }
    public void setAuditOpinion(String auditOpinion)
    {
        this.auditOpinion = auditOpinion;
    }

    public String getAuditOpinion()
    {
        return auditOpinion;
    }

    public List<MaterialOutboundApplyDetail> getMaterialOutboundApplyDetailList()
    {
        return materialOutboundApplyDetailList;
    }

    public void setMaterialOutboundApplyDetailList(List<MaterialOutboundApplyDetail> materialOutboundApplyDetailList)
    {
        this.materialOutboundApplyDetailList = materialOutboundApplyDetailList;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
                .append("applyId", getApplyId())
                .append("applyCode", getApplyCode())
                .append("applyType", getApplyType())
                .append("status", getStatus())
                .append("orderId", getOrderId())
                .append("applyUserId", getApplyUserId())
                .append("applyTime", getApplyTime())
                .append("auditUserId", getAuditUserId())
                .append("auditTime", getAuditTime())
                .append("auditOpinion", getAuditOpinion())
                .append("createBy", getCreateBy())
                .append("createTime", getCreateTime())
                .append("updateBy", getUpdateBy())
                .append("updateTime", getUpdateTime())
                .append("remark", getRemark())
                .append("materialOutboundApplyDetailList", getMaterialOutboundApplyDetailList())
                .append("applyUserName", getApplyUserName())
                .append("auditUserName", getAuditUserName())
                .append("orderCode", getOrderCode())
                .toString();
    }
}
